<script type="text/javascript">
var peta;
function peta_awal(){
    daftar_lokasi();
    var awal = new google.maps.LatLng(-7.090911,107.668887);
    var petaoption = {
        zoom: 8,
        center: awal,
        mapTypeId: google.maps.MapTypeId.ROADMAP
        };
    peta = new google.maps.Map(document.getElementById("petaku"),petaoption);
    google.maps.event.addListener(peta,'click',function(event){
        kasihtanda(event.latLng);
    });
}

function daftar_lokasi(){
    $('#teks').load('daftar_lokasi.php');
}

function setpeta(x,y,id){
    var lokasibaru = new google.maps.LatLng(x, y);
    var petaoption = {
        zoom: 14,
        center: lokasibaru,
        mapTypeId: google.maps.MapTypeId.ROADMAP
        };
    peta = new google.maps.Map(document.getElementById("petaku"),petaoption);
    tanda = new google.maps.Marker({
        position: lokasibaru,
        map: peta
    });
    var idnya = "#"+id;
    
    var isistring = $(idnya).html();
    var infowindow = new google.maps.InfoWindow({
        content: isistring
    });
    google.maps.event.addListener(tanda, 'click', function() {
      infowindow.open(peta,tanda);
      google.maps.event.addListener(infowindow, 'domready', function () {
          $("#tabs").tabs();
      });
    });
    google.maps.event.addListener(peta,'click',function(event){
        kasihtanda(event.latLng);
    });
}
</script>

<div id="petaku" style="width:940px; height:500px"></div>
<br>
<div id="content">
	<h2>Welcome to my website!</h2>
	<div id=teks></div>
	</div>
<div id="sidebar2">
	<h2>Donec dictum metus</h2>
	<ul class="style1">
		<li class="first"><a href="#">Maecenas luctus lectus at sapien</a></li>
		<li><a href="#">Etiam rhoncus volutpat erat</a></li>
		<li><a href="#">Etiam posuere augue sit amet nisl</a></li>
		<li><a href="#">Mauris vulputate dolor sit amet nibh</a></li>
		<li><a href="#">Nulla luctus eleifend purus</a></li>
		<li><a href="#">Etiam rhoncus volutpat erat</a></li>
		<li><a href="#">Etiam posuere augue sit amet nisl</a></li>
	</ul>
</div>
